﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" x:Class="WMSSoft.WinKStart.Setting_NewEditPanel"
        x:Name="SettingNewEditPanel"
         Title="{Binding ViewName}" Height="366" Width="455" ResizeMode="NoResize" ShowInTaskbar="True" WindowStartupLocation="CenterOwner"  Icon="/WinKStart;component/grfx/preferences-other.png" WindowStyle="ToolWindow">
    <Grid>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="19*"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="1" Orientation="Horizontal" FlowDirection="RightToLeft" >
                <Button Content="{Binding Cmd_CloseClick.ViewName}" Height="23" HorizontalAlignment="Right" Margin="10,10,0,5" Width="100" IsCancel="True" Command="{Binding Cmd_CloseClick.Command}" CommandParameter="{Binding ElementName=SettingNewEditPanel}" TabIndex="24" />
                <Button Content="{Binding Cmd_OkClick.ViewName}" Height="23" HorizontalAlignment="Right" Margin="5,10,0,5" Width="100" IsCancel="True" Command="{Binding Cmd_OkClick.Command}" CommandParameter="{Binding ElementName=SettingNewEditPanel}" TabIndex="23" />
                <xctk:ZoomboxViewFinderDisplay Width="100"/>
                
            </StackPanel>
            <Grid Margin="10,10,10,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="25"/>
                    <RowDefinition Height="25"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="25"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <Label Content="Caption:" HorizontalAlignment="Left" Padding="0,0,0,0" Margin="0,2,10,5" VerticalAlignment="Top" TabIndex="0"/>
                <TextBox Grid.Column="1" TextWrapping="Wrap" Margin="0,0,0,5" Text="{Binding PanelCaption}" VerticalContentAlignment="Center" IsEnabled="{Binding CanEditPanelID}" TabIndex="1"/>
                <Label Content="Collapse:" HorizontalAlignment="Left" Padding="0,0,0,0" Margin="0,2,10,5" VerticalAlignment="Top" Grid.Row="2" TabIndex="4"/>
                <ComboBox  Margin="0,0,0,5" Grid.Row="2" Grid.Column="1"  SelectedValue="{Binding SelectedExpandableState}" SelectedValuePath="Key" DisplayMemberPath="Value"  ItemsSource="{Binding ExpandableStates}" HorizontalContentAlignment="Stretch" TabIndex="5" />
                <Label Content="PanelID:" HorizontalAlignment="Left" Padding="0,0,0,0" Margin="0,1,10,5" VerticalAlignment="Top" Grid.Row="1" TabIndex="2"/>
                <TextBox Grid.Column="1" Grid.Row="1" TextWrapping="Wrap" Margin="0,0,0,5" Text="{Binding PanelID}" VerticalContentAlignment="Center" IsEnabled="{Binding EnableNameChanging}" Height="20" TabIndex="3"/>
                <Label Content="Default State:" HorizontalAlignment="Left" Padding="0,0,0,0" Margin="0,1,10,5" VerticalAlignment="Top" Grid.Row="3" TabIndex="6"/>
                <ComboBox Margin="0,0,0,5" VerticalAlignment="Top" Grid.Column="1" Grid.Row="3" SelectedValue="{Binding DefaultExpandableState}" SelectedValuePath="Key" DisplayMemberPath="Value"  ItemsSource="{Binding DefaultExpandableStates}" TabIndex="7"/>
                <Label Content="State to other:" HorizontalAlignment="Left" Padding="0,0,0,0" Margin="0,1,10,5" VerticalAlignment="Top" Grid.Row="4" TabIndex="8"/>
                <ComboBox Margin="0,0,0,5" VerticalAlignment="Top" Grid.Column="1" Grid.Row="4" SelectedValue="{Binding SelectedExpandableStateToOtherExpand}" SelectedValuePath="Key" DisplayMemberPath="Value"  ItemsSource="{Binding EpandStatesIfOtherPanelExpand}" TabIndex="9"/>

                <Label Content="DataSource:" HorizontalAlignment="Left" Padding="0,0,0,0" Margin="0,1,10,5" VerticalAlignment="Top" Grid.Row="5" TabIndex="10"/>
                <ComboBox Margin="0,0,0,5" VerticalAlignment="Top" Grid.Column="1" Grid.Row="5" SelectedValue="{Binding SelectedDataSource}" SelectedValuePath="Key" DisplayMemberPath="Value"  ItemsSource="{Binding DataSourceItems}" TabIndex="11"/>
                <Label Content="Filter:" Margin="0,0,0,0" Padding="0,2,0,5" VerticalAlignment="Top" Grid.Row="6" TabIndex="12"/>
                <Grid Grid.Column="1" Grid.Row="6">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <TextBox x:Name="txt_RegionFilter" Grid.Column="0" TextWrapping="Wrap" Margin="0,0,0,5" Text="{Binding SelectedFilter}" VerticalContentAlignment="Center" IsEnabled="{Binding ChooseFilterIsEnabled}" Height="20" IsReadOnly="True" TabIndex="13" />
                    <Button Width="20" Height="20" Grid.Column="1" Content="{Binding Cmd_ChooseFilter.ViewName}" Margin="0,-4,0,0" Padding="0" Command="{Binding Cmd_ChooseFilter.Command}" CommandParameter="{Binding ElementName=txt_RegionFilter}" IsEnabled="{Binding ChooseFilterIsEnabled}" TabIndex="14" />
                </Grid>
                <Label Content="Navigate:" Margin="0,3,0,0" Padding="0,0,0,0" VerticalAlignment="Top" Grid.Row="7" TabIndex="15"/>
                <ComboBox Margin="0,0,0,5" VerticalAlignment="Top" Grid.Column="1" Grid.Row="7" SelectedValue="{Binding NavigationState}" SelectedValuePath="Key" DisplayMemberPath="Value"  ItemsSource="{Binding NavigationStates}" TabIndex="16"/>
                <Label Content="Context-Menu:" Grid.Column="0" Grid.Row="8" Padding="0" Margin="0,3,0,0" TabIndex="17" />
                <ComboBox Margin="0,0,0,5" VerticalAlignment="Top" Grid.Column="1" Grid.Row="8" SelectedValue="{Binding UseContextMenu}" SelectedValuePath="Key" DisplayMemberPath="Value"  ItemsSource="{Binding ContextMenuStates}" TabIndex="18"/>
                <Label Content="Sort:"  Margin="0,3,0,0" Padding="0,0,0,0" VerticalAlignment="Top" Grid.Row="9" TabIndex="19"/>
                <ComboBox Margin="0,0,0,5" VerticalAlignment="Top" Grid.Column="1" Grid.Row="9" SelectedValue="{Binding SortItems}" SelectedValuePath="Key" DisplayMemberPath="Value"  ItemsSource="{Binding SortStates}" TabIndex="20"/>
                <Label Content="Max Visible Items:" HorizontalAlignment="Left" Margin="0,2,5,0" Padding="0,0,0,0" VerticalAlignment="Top" Grid.Row="10" TabIndex="21"/>
                <xctk:IntegerUpDown RenderTransformOrigin="0.5,0.5" Width="48" TextAlignment="Left" Grid.Row="10" Grid.Column="1" HorizontalAlignment="Left" Minimum="0" Maximum="20" Value="{Binding MaxVisibleItems}" TabIndex="22"/>
            </Grid>
        </Grid>
    </Grid>
</Window>
